import Vue from "vue";
import App from "./App";
import router from "./router";

Vue.config.productionTip = false;
// 引入mint-ui
// import { Header, Swipe, SwipeItem, Toast, Button } from "mint-ui";
import MintUi from "mint-ui";
Vue.use(MintUi);
import "mint-ui/lib/style.css";
// Vue.component(Header.name, Header);
// Vue.component(Swipe.name, Swipe);
// Vue.component(SwipeItem.name, SwipeItem);
// Vue.component(Toast.name, Toast);
// Vue.component(Button.name, Button);

//引入mui
import "@/assets/lib/css/mui.min.css";
import "@/assets/lib/css/icons-extra.css";

// 导入axios
import axios from "axios";

// 设置默认请求路径
axios.defaults.baseURL = "http://lovegf.cn:8899";
Vue.prototype.$http = axios;

// 导入格式化时间插件
import moment from "moment";

// 格式化时间过滤器
Vue.filter("dtFormat", function(dateStr, pattern = "YYYY-MM-DD HH:mm:ss") {
  return moment(dateStr).format(pattern);
});

// 导入vuex 
import store from "./store/index.js"

// 导入缩略图插件
import VuePreview from 'vue-preview'
Vue.use(VuePreview)
/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  render: h => h(App),
  store
});
